var status = -1;

function start() {
    action(1, 0, 0)
}

function action(c, b, a) {
    status++;
    if (cm.getMapId() == 450013800) {
        action1(c, b, a)
    } else {
        action2(c, b, a)
    }
}

function action1(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 0, 0);
            cm.fieldEffect_PlayBGM("Bgm00.img/Silence", 0, 0);
            cm.inGameDirectionEvent_AskAnswerTime(100)
        } else {
            if (status === a++) {
                cm.curNodeEventEnd(true);
                cm.fieldEffect_复合图片动画(["Effect/Direction20.img/bossBlackMage/start_spine/blasck_space", "animation", "", "intro"], [0, 0, 1, 0, 0, 0, 0, 1]);
                cm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/BM3/boss_start", 200);
                cm.inGameDirectionEvent_AskAnswerTime(5000)
            } else {
                if (status === a++) {
                    cm.fieldEffect_ProcessOnOffLayer("BlackOut", "Map/Effect2.img/BlackOut", 0, 1000, 0, 0, 13, 4, 1, -1, 0, 0, 0);
                    cm.inGameDirectionEvent_AskAnswerTime(1000)
                } else {
                    if (status === a++) {
                        cm.fieldEffect_取消复合图片动画("intro", 100, 0);
                        cm.fieldEffect_ProcessOnOffLayer("BlackOut", "", 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                        cm.setInGameDirectionMode(false, true, false);
                        cm.dispose();
                        cm.warp(450013810, 0, true)
                    }
                }
            }
        }
    }
}

function action2(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 0, 0);
            cm.fieldEffect_PlayBGM("Bgm00.img/Silence", 0, 0);
            cm.inGameDirectionEvent_AskAnswerTime(100)
        } else {
            if (status === a++) {
                cm.curNodeEventEnd(true);
                cm.fieldEffect_复合图片动画(["Effect/Direction20.img/bossBlackMage/start_spine/blasck_space", "animation", "", "intro"], [0, 0, 1, 0, 0, 0, 0, 1]);
                cm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/BM3/boss_start", 200);
                cm.inGameDirectionEvent_AskAnswerTime(5000)
            } else {
                if (status === a++) {
                    cm.fieldEffect_ProcessOnOffLayer("BlackOut", "Map/Effect2.img/BlackOut", 0, 1000, 0, 0, 13, 4, 1, -1, 0, 0, 0);
                    cm.inGameDirectionEvent_AskAnswerTime(1000)
                } else {
                    if (status === a++) {
                        cm.fieldEffect_取消复合图片动画("intro", 100, 0);
                        cm.fieldEffect_ProcessOnOffLayer("BlackOut", "", 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                        cm.setInGameDirectionMode(false, true, false);
                        cm.dispose();
                        cm.warp(450013810, 0, true)
                    }
                }
            }
        }
    }
}

function action3(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {}
    }
}

function action4(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {}
    }
}

function action5(d, c, b) {
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {}
    }
};